package com.zzyl.nursing.job;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class Content {

    // 固定字段
    private String resource;
    private String event;
    private String event_time;
    private String event_time_ms;
    private String request_id;

    // 嵌套对象
    private NotifyData notify_data;

    @Data
    public static class NotifyData {
        private Header header;
        private Body body;
    }

    @Data
    public static class Header {
        private String app_id;
        private String device_id;
        private String node_id;
        private String product_id;
        private String gateway_id;
    }

    @Data
    public static class Body {
        private List<Service> services;
    }

    @Data
    public static class Service {
        private String service_id;
        private Map<String, Object> properties; // 动态键值对
        private String event_time;
    }
}